package com.xch.sboot.service.user.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * @author xch
 * 2022/12/14 14:46
 */

@Data
@NoArgsConstructor
@ApiModel(description = "登录DTO;支持(用户名/邮箱 + 密码)")
public class SignInDTO {

    @ApiModelProperty("用户名、邮箱")
    @NotBlank(message = "用户名/邮箱不能为空")
    private String username;

    @ApiModelProperty("加密后的密码串")
    @NotBlank(message = "密码串不能为空")
    private String passwordStr;

    @Override
    public String toString() {
        return "SignInDTO{" +
                "username='" + username + '\'' +
                ", passwordStr='" + passwordStr + '\'' +
                '}';
    }
}
